import java.util.Scanner;
public class homework16 {

        public static void main(String[] args) {
            int[] intArray={31,28,31,30,31,30,31,31,30,31,30,31};//十二月份

            Scanner input = new Scanner(System.in);
            System.out.println("请输入某年某月：");
            System.out.print("年：");
            int year= input.nextInt();
            System.out.print("月：");
            int mm= input.nextInt();
            //每过四年就有一次闰年
            //如果是闰年。
            if((year % 4 == 0 && year % 100 != 0)||(year % 400 == 0)){
                intArray[1] = 29;//闰年天数加1
            }
            System.out.println(year+"年的"+mm+"月有"+intArray[mm-1]+"天");
        }
    }



